package com.zkthink.ceres.applet.product.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zkthink.base.R;
import com.zkthink.ceres.applet.common.domin.PageDate;
import com.zkthink.ceres.applet.product.domain.entity.CeresProductCategory;
import com.zkthink.ceres.applet.product.domain.vo.ProductSearchVo;
import com.zkthink.ceres.applet.product.service.CeresProductCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author cmz
 * @Date 2024-04-28 14:00
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/applet/pcProductCategory")
@Api(value = "pcProductCategory", tags = "产品分类")
public class PcProductCategoryController {
    @Autowired
    private CeresProductCategoryService ceresProductCategoryService;

    @ApiOperation(value = "查询所有产品分类", notes = "查询所有产品分类")
    @PostMapping(value = "/findByPage")
    public R findAll(@RequestBody PageDate pageDate) {
        return ceresProductCategoryService.findByPage(pageDate);
    }

    @ApiOperation(value = "查询所有产品分类", notes = "查询所有产品分类")
    @PostMapping(value = "/findList")
    public R findList(@RequestBody ProductSearchVo productSearchVo) {
        return ceresProductCategoryService.findList(productSearchVo);
    }

}
